<template>
	<view class="page">
		<view class="user-info">
			<u-avatar :src="userInfo.avatar_url" size="50"></u-avatar>
			<view class="user-nickname u-line-1">
				<!-- <u-icon name="account-fill" color="#273368" size="28"></u-icon> -->
				<text class="u-line-1">{{userInfo.nick_name}}</text>
			</view>
		</view>
		<view class="head-title">打卡记录</view>
		<view class="list">
			<view v-for="(item, index) in list" :key="index" class="item" @click="gotoDetail()">
				<view class="left">
					<image :src="item.thumb"></image>
				</view>
				<view class="right">
					<view class="title">青春活力线路打卡点01</view>
					<view class="data">
						时间：2021-7-2 9:00
					</view>
					<view>
						积分:+15
					</view>

				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					avatar_url: "https://cdn.uviewui.com/uview/goods/1.jpg",
					nick_name: "昵称"
				},
				list: [{
					thumb: "https://cdn.uviewui.com/uview/goods/1.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/2.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/3.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/4.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/5.jpg"
				}]
			}
		},
		methods: {
			gotoDetail() {
				let id = 1;
				uni.navigateTo({
					url: '/pages/gift/detail?id=' + id
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.page {
		background-color: #f8f8f8;
		.user-info {
			padding: 34rpx 20rpx;
			margin-bottom: 40rpx;
			display: flex;
			align-items: center;

			.user-nickname {
				margin-left: 30rpx;
				display: flex;
				align-items: center;

				&>text {
					font-size: 20;
					font-weight: bold;
					font-family: 'Segoe UI';
				}
			}
		}

		.head-title {
			margin: 20rpx;
			font-weight: bold;
			font-size: 32rpx;
		}

		.list {
			margin: 20rpx;
			padding-bottom: 30rpx;

			.item {
				display: flex;
				font-size: 24rpx;
				margin-bottom: 20rpx;
				box-shadow: 0 0 10rpx #E0E0E0;
				border-radius: 10rpx;
				background-color: #FFFFFF;

				.left {
					width: 220rpx;

					image {
						width: 220rpx;
						height: 180rpx;
						border-radius: 10rpx;
					}
				}

				.right {
					width: 500rpx;
					margin-left: 20rpx;

					.title {
						font-weight: bold;
						font-size: 32rpx;
						margin-bottom: 20rpx;
					}


				}
			}
		}
	}
</style>
